<?php

class BackupRecord
{
    const BACKUP_METADATA_FILE = 'data/backups/backups.xml';

	// fields
	public $date;
	public $comment;
    public $filename;

    public function getDate() {
        return $this->date;
    }

    public function setDate($date) {
        $this->date = $date;
    }

    public function getComment() {
        return $this->comment;
    }

    public function setComment($comment) {
        $this->comment = $comment;
    }

    public function getFilename() {
        return $this->filename;
    }

    public function setFilename($filename) {
        $this->filename = $filename;
    }

	public function setData($date, $comment, $filename) {
		$this->date = $date;
        $this->comment = $comment;
        $this->filename = $filename;
	}

	public function setDataByUserRoleRecord(BackupRecord $record) {
		$this->setData($record->date, $record->comment. $record->filename);
	}

	public function equals(BackupRecord $record) {
		return	$this->getDate() == $record->getDate()	&&
				$this->getFilename() == $record->getFilename() &&
				$this->getComment() == $record->getComment();
		return false;
	}
}

?>